home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsICancelable.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  103 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICancelable.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICancelable_h__
  6. #define __gen_nsICancelable_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsICancelable */
  19. #define NS_ICANCELABLE_IID_STR "d94ac0a0-bb18-46b8-844e-84159064b0bd"
  20.  
  21. #define NS_ICANCELABLE_IID \
  22.   {0xd94ac0a0, 0xbb18, 0x46b8, \
  23.     { 0x84, 0x4e, 0x84, 0x15, 0x90, 0x64, 0xb0, 0xbd }}
  24.  
  25. /**
  26.  * This interface provides a means to cancel an operation that is in progress.
  27.  *
  28.  * @status UNDER_REVIEW
  29.  */
  30. class NS_NO_VTABLE nsICancelable : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICANCELABLE_IID)
  34.  
  35.   /**
  36.    * Call this method to request that this object abort whatever operation it
  37.    * may be performing.
  38.    *
  39.    * @param aReason
  40.    *        Pass a failure code to indicate the reason why this operation is
  41.    *        being canceled.  It is an error to pass a success code.
  42.    */
  43.   /* void cancel (in nsresult aReason); */
  44.   NS_IMETHOD Cancel(nsresult aReason) = 0;
  45.  
  46. };
  47.  
  48. /* Use this macro when declaring classes that implement this interface. */
  49. #define NS_DECL_NSICANCELABLE \
  50.   NS_IMETHOD Cancel(nsresult aReason); 
  51.  
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  53. #define NS_FORWARD_NSICANCELABLE(_to) \
  54.   NS_IMETHOD Cancel(nsresult aReason) { return _to Cancel(aReason); } 
  55.  
  56. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  57. #define NS_FORWARD_SAFE_NSICANCELABLE(_to) \
  58.   NS_IMETHOD Cancel(nsresult aReason) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(aReason); } 
  59.  
  60. #if 0
  61. /* Use the code below as a template for the implementation class for this interface. */
  62.  
  63. /* Header file */
  64. class nsCancelable : public nsICancelable
  65. {
  66. public:
  67.   NS_DECL_ISUPPORTS
  68.   NS_DECL_NSICANCELABLE
  69.  
  70.   nsCancelable();
  71.  
  72. private:
  73.   ~nsCancelable();
  74.  
  75. protected:
  76.   /* additional members */
  77. };
  78.  
  79. /* Implementation file */
  80. NS_IMPL_ISUPPORTS1(nsCancelable, nsICancelable)
  81.  
  82. nsCancelable::nsCancelable()
  83. {
  84.   /* member initializers and constructor code */
  85. }
  86.  
  87. nsCancelable::~nsCancelable()
  88. {
  89.   /* destructor code */
  90. }
  91.  
  92. /* void cancel (in nsresult aReason); */
  93. NS_IMETHODIMP nsCancelable::Cancel(nsresult aReason)
  94. {
  95.     return NS_ERROR_NOT_IMPLEMENTED;
  96. }
  97.  
  98. /* End of implementation class template. */
  99. #endif
  100.  
  101.  
  102. #endif /* __gen_nsICancelable_h__ */
  103.